@echo off
:: MXSPLI-ShareMX
:: MixSoft Programming Language Interpreter
:: Version v6_ShareMXv2
:: Developers: Mihail Mojsoski
set library=CONSOLE
set vr=%~1
set progCONSOLE_OUT=Out
set progCONSOLE_PAUSE=Pause
set progCONSOLE_COLOR=Color
set progCONSOLE_IN=In
set progCONSOLE_TITLE=Title
set progCONSOLE_TIMEOUT=Timeout
set progCONSOLE_SIZE=Size
set progCONSOLE_CLEAR=Cls
set tmp=prog%vr%
call set tmp=%%%tmp%%%
call :msg%tmp% %2 %3 %4 %5 %6 %7 %8 %9
goto :end

:msgCls
cls
goto end

:msgSize
mode con cols=%~1 lines=%~2
goto end

:msgTimeout
if "%debug%"=="1" goto end
if "%~1"=="" (
 timeout /t 1
) else (
 timeout /t %~1
)
goto end

:msgTitle
title %~1
goto end

:msgIn
if "%debug%"=="1" goto end
set /p %1=%~2
goto end

:msg
echo %LNG_ATLINE% %line%: %LNG_UNKFC% "%vr%" %LNG_INLIB% %library%.
if "%debug%"=="1" echo %LNG_ATLINE% %line%: %LNG_UNKFC% "%vr%" %LNG_INLIB% %library%. >> "%mypath%\%debugpath%"
goto end

:msgColor
set one=%~1
set two=%~2
set Black=0
set Blue=1
set Green=2
set Aqua=3
set Red=4
set Purple=5
set Yellow=6
set White=7
set Gray=8
set LightBlue=9
set LightGreen=A
set LightAqua=B
set LightRed=C
set LightPurple=D
set LightYellow=E
set LightWhite=F
set BrightWhite=F
call set tmp1=%%%one%%%
call set tmp2=%%%two%%%
color %tmp1%%tmp2%
goto end

:msgPause
if "%debug%"=="1" goto end
if "%~1"=="" (
 pause
) else (
 call :msgOut "%~1"
 pause > nul
)
goto end

:msgOut
set var=%~1
if "%~1"=="" goto :end
if "%~1"=="OFF" goto :end
if "%~1"=="ON" goto :end
if "%~1"=="off" goto :end
if "%~1"=="on" goto :end
echo %var%
goto end

:end